//
//  OrderListTableViewCell.m
//  ChineseCollegeStudentsNetwork
//
//  Created by 刘喆 on 2019/3/6.
//  Copyright © 2019年 刘喆. All rights reserved.
//

#import "OrderListTableViewCell.h"

@implementation OrderListTableViewCell

#pragma mark - Init
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubviews];
    }
    return self;
}

#pragma mark - Subviews
#pragma amrk layout subviews
- (void)layoutSubviewsInView {
    
    [_numL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.mas_equalTo(20);
        make.height.mas_equalTo (14);
    }];
    
    [_moneyL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.equalTo(self.numL.mas_bottom).offset(8);
        make.height.mas_equalTo (14);
    }];
    
    [_addressL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.equalTo(self.moneyL.mas_bottom).offset(8);
        make.height.mas_equalTo (14);
    }];
    
    [_dataL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.equalTo(self.addressL.mas_bottom).offset(8);
        make.height.mas_equalTo (14);
    }];
}

#pragma mark create subviews
- (void)createSubviews {
    
    [self.contentView addSubview:self.numL];
    [self.contentView addSubview:self.moneyL];
    [self.contentView addSubview:self.addressL];
    [self.contentView addSubview:self.dataL];
    
    [self layoutSubviewsInView];
}



- (UILabel *)numL {
    if (!_numL) {
        _numL = [[UILabel alloc] init];
        _numL.font = [UIFont systemFontOfSize:14];
        _numL.textColor = kRGB(153, 153, 153, 1);

    }
    return _numL;
}

- (UILabel *)moneyL {
    if (!_moneyL) {
        _moneyL = [[UILabel alloc] init];
        _moneyL.font = [UIFont systemFontOfSize:14];
        _moneyL.textColor = kRGB(153, 153, 153, 1);

    }
    return _moneyL;
}

- (UILabel *)addressL {
    if (!_addressL) {
        _addressL = [[UILabel alloc] init];
        _addressL.font = [UIFont systemFontOfSize:14];
        _addressL.textColor = kRGB(153, 153, 153, 1);

    }
    return _addressL;
}

- (UILabel *)dataL {
    if (!_dataL) {
        _dataL = [[UILabel alloc] init];
        _dataL.font = [UIFont systemFontOfSize:14];
        _dataL.textColor = kRGB(153, 153, 153, 1);
    }
    return _dataL;
}




@end
